import {EventEmitter, Injectable, Output} from '@angular/core';
import {Error} from './Error';

@Injectable({
  providedIn: 'root'
})
export class ErrorService {

  @Output() errorOccur = new EventEmitter<Error>();

  occur(error: Error): void {
    this.errorOccur.emit(error);
  }

}
